﻿using System;
using System.ComponentModel.DataAnnotations.Schema;

namespace TulingMember.Core
{
    public class SaleOrderReturnDetail
    {
        public long Id { get; set; }
        public int Quantity { get; set; }
        public decimal UnitPrice { get; set; }
        public DateTime CreatedAt { get; set; } = DateTime.Now;
        public string Remark { get; set; }
        public long SaleOrderReturnId { get; set; }
        public long ProductId { get; set; }

        [NotMapped]
        public decimal TotalPrice => Quantity * UnitPrice;

        public virtual SaleOrderReturn BuyOrderReturn { get; set; }
        public virtual Product Product { get; set; }
    }
}
